package org.senzacontrollo.designPatterns.builder;

public class NotOrientedERBuilder extends ModelBuilder{
	
	ErModel erModel;
	
	public NotOrientedERBuilder() {
		erModel = new ErModel();
	}

	@Override
	public void addEntity(String name) {
		erModel.setEntityFrom(name);
	}

	@Override
	public void addRelationship(String from, String to, String relationship) {
		erModel.setEntityFrom(from);
		erModel.setEntityTo(from);
		erModel.setRelationship(relationship);
		
		
	}

	@Override
	public void addCardMin(String entity, String relationship, String value) {
		erModel.setCardMin(value);
	}

	@Override
	public void addCardMax(String entity, String relationship, String value) {
		erModel.setCardMin(value);
		
	}

	@Override
	public Object getModel() {
		return erModel;
	}

}
